<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport"
		content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">

	<title>耿哥商场</title>

	<link href="../AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
	<link href="../AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css" />

	<link href="../basic/css/demo.css" rel="stylesheet" type="text/css" />

	<link href="../css/hmstyle.css" rel="stylesheet" type="text/css" />
	<link href="../css/skin.css" rel="stylesheet" type="text/css" />
	<script src="../AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
	<script src="../AmazeUI-2.4.2/assets/js/amazeui.min.js"></script>
	<script type="text/javascript " src="../basic/js/quick_links.js "></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.6/vue.min.js"></script>
	<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.19.2/axios.min.js"></script>
	<script src="../js/axiosUtil.js"></script>
	<style>
		.goodImg {
			height: 180px;
			width: 180px;
    		margin-right: -90px;
		}
	</style>
</head>

<body>

	<div class="hmtop" id="app1">
		<!--顶部导航条 -->
		<div class="am-container header">
			<ul class="message-l">
				<div class="topMessage">
					<template v-if="!islogin">
						<div class="menu-hd">
							<a href="login.html" target="_top" class="h">亲，请登录</a>
							<a href="register.html" target="_top">免费注册</a>
						</div>
					</template>
					<template v-else>
						<div class="menu-hd">
							<a href="#" style="color: red;">{{username}}</a>
							<a href="#" @click="logout">退出登录</a>
						</div>
					</template>
				</div>
			</ul>
			<ul class="message-r" v-if="islogin">
				<div class="topMessage home">
					<div class="menu-hd"><a href="home.html" target="_top" class="h">商城首页</a></div>
				</div>
				<template v-if="islogin">
					<div class="topMessage my-shangcheng">
						<div class="menu-hd MyShangcheng"><a href="information.html" target="_top"><i
									class="am-icon-user am-icon-fw"></i>个人中心</a></div>
					</div>
					<div class="topMessage mini-cart">
						<div class="menu-hd"><a id="mc-menu-hd" href="shopcart.html" target="_top"><i
									class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span><strong
									id="J_MiniCartNum" class="h">0</strong></a></div>
					</div>
				</template>
			</ul>
		</div>

		<!--悬浮搜索框-->

		<div class="nav white">
			<div class="logo"><img src="../images/logo.png" /></div>
			<div class="logoBig">
				<li><img src="../images/logobig.png" /></li>
			</div>

			<div class="search-bar pr">
				<a name="index_none_header_sysc" href="#"></a>
				<form onsubmit="return false;">
					<input id="searchInput" name="index_none_header_sysc" type="text" placeholder="搜索"
						autocomplete="off" v-model="name">
					<input id="ai-topsearch" class="submit am-btn" value="搜索" index="1" type="button" @click="search">
				</form>
			</div>
		</div>

		<div class="clear"></div>
	</div>
	<div class="banner">
		<!--轮播 -->
		<div class="am-slider am-slider-default scoll" data-am-flexslider id="demo-slider-0">
			<ul class="am-slides">
				<li class="banner1"><a href="introduction.html"><img src="../images/ad1.jpg" /></a></li>
				<li class="banner2"><a><img src="../images/ad2.jpg" /></a></li>
				<li class="banner3"><a><img src="../images/ad3.jpg" /></a></li>
				<li class="banner4"><a><img src="../images/ad4.jpg" /></a></li>

			</ul>
		</div>
		<div class="clear"></div>
	</div>

	<div class="shopNav">
		<div class="slideall">

			<div class="long-title"><span class="all-goods">全部分类</span></div>
			<div class="nav-cont">
				<ul>
					<li class="index"><a href="home.html">首页</a></li>
					<li class="qc"><a href="#">闪购</a></li>
					<li class="qc"><a href="#">限时抢</a></li>
					<li class="qc"><a href="#">团购</a></li>
					<li class="qc last"><a href="#">大包装</a></li>
				</ul>

			</div>

			<!--侧边导航 -->
			<div id="nav" class="navfull">
				<div class="area clearfix">
					<div class="category-content" id="guide_2">

						<div class="category" id="app2">
							<ul class="category-list" id="js_climit_li">
								<li class="appliance js_toggle relative first" v-for="item in tableData" :key="item.id">
									<div class="category-info">
										<!-- 三级菜单 -->
										<h3 class="category-name b-category-name">
											<!-- <i><img src="../images/cake.png"></i> -->
											<a class="ml-22" :title="item.name">{{item.name}}</a>
										</h3>
										<em>&gt;</em>
									</div>
									<div class="menu-item menu-in top">
										<div class="area-in">
											<div class="area-bg">
												<div class="menu-srot">
													<div class="sort-side">
														<!-- 二级菜单 -->
														<dl class="dl-sort" v-for="child in item.children"
															:key="child.id">
															<dt><span :title="child.name">{{child.name}}</span></dt>
														</dl>
													</div>

												</div>
											</div>
										</div>
									</div>
									<b class="arrow"></b>
								</li>
							</ul>
						</div>
					</div>

				</div>
			</div>


			<!--轮播-->


			<!--小导航 -->
			<div class="am-g am-g-fixed smallnav">
				<div class="am-u-sm-3">
					<a href="sort.html"><img src="../images/navsmall.jpg" />
						<div class="title">商品分类</div>
					</a>
				</div>
				<div class="am-u-sm-3">
					<a href="#"><img src="../images/huismall.jpg" />
						<div class="title">大聚惠</div>
					</a>
				</div>
				<div class="am-u-sm-3">
					<a href="#"><img src="../images/mansmall.jpg" />
						<div class="title">个人中心</div>
					</a>
				</div>
				<div class="am-u-sm-3">
					<a href="#"><img src="../images/moneysmall.jpg" />
						<div class="title">投资理财</div>
					</a>
				</div>
			</div>

			<!--走马灯 -->

			<div class="marqueen">
				<span class="marqueen-title">商城头条</span>
				<div class="demo">

					<ul>
						<li class="title-first"><a target="_blank" href="#">
								<img src="../images/TJ2.jpg"></img>
								<span>[特惠]</span>商城爆品1分秒
							</a></li>
						<li class="title-first"><a target="_blank" href="#">
								<span>[公告]</span>商城与广州市签署战略合作协议
								<img src="../images/TJ.jpg"></img>
								<p>XXXXXXXXXXXXXXXXXX</p>
							</a></li>

						<div class="mod-vip">
							<div class="m-baseinfo">
								<a href="../person/index.html">
									<img src="../images/getAvatar.do.jpg">
								</a>
								<em>
									Hi,<span class="s-name">小叮当</span>
									<a href="#">
										<p>点击更多优惠活动</p>
									</a>
								</em>
							</div>
							<div class="member-logout">
								<a class="am-btn-warning btn" href="login.html">登录</a>
								<a class="am-btn-warning btn" href="register.html">注册</a>
							</div>
							<div class="member-login">
								<a href="#"><strong>0</strong>待收货</a>
								<a href="#"><strong>0</strong>待发货</a>
								<a href="#"><strong>0</strong>待付款</a>
								<a href="#"><strong>0</strong>待评价</a>
							</div>
							<div class="clear"></div>
						</div>

						<li><a target="_blank" href="#"><span>[特惠]</span>洋河年末大促，低至两件五折</a></li>
						<li><a target="_blank" href="#"><span>[公告]</span>华北、华中部分地区配送延迟</a></li>
						<li><a target="_blank" href="#"><span>[特惠]</span>家电狂欢千亿礼券 买1送1！</a></li>

					</ul>
					<div class="advTip"><img src="../images/advTip.jpg" /></div>
				</div>
			</div>
			<div class="clear"></div>
		</div>
		<script type="text/javascript">
			if ($(window).width() < 640) {
				function autoScroll(obj) {
					$(obj).find("ul").animate({
						marginTop: "-39px"
					}, 500, function () {
						$(this).css({
							marginTop: "0px"
						}).find("li:first").appendTo(this);
					})
				}
				$(function () {
					setInterval('autoScroll(".demo")', 3000);
				})
			}
		</script>
	</div>
	<div class="shopMainbg">
		<div class="shopMain" id="shopmain">

			<!--今日推荐 -->

			<div class="am-g am-g-fixed recommendation">
				<div class="clock am-u-sm-3" ">
							<img src=" ../images/2016.png "></img>
							<p>今日<br>推荐</p>
						</div>
						<div class=" am-u-sm-4 am-u-lg-3 ">
							<div class=" info ">
								<h3>真的有鱼</h3>
								<h4>开年福利篇</h4>
							</div>
							<div class=" recommendationMain one">
					<a href="introduction.html"><img src="../images/tj.png "></img></a>
				</div>
			</div>
			<div class="am-u-sm-4 am-u-lg-3 ">
				<div class="info ">
					<h3>囤货过冬</h3>
					<h4>让爱早回家</h4>
				</div>
				<div class="recommendationMain two">
					<img src="../images/tj1.png "></img>
				</div>
			</div>
			<div class="am-u-sm-4 am-u-lg-3 ">
				<div class="info ">
					<h3>浪漫情人节</h3>
					<h4>甜甜蜜蜜</h4>
				</div>
				<div class="recommendationMain three">
					<img src="../images/tj2.png "></img>
				</div>
			</div>

		</div>
		<div class="clear "></div>
		<!--热门活动 -->

		<div class="am-container activity ">
			<div class="shopTitle ">
				<h4>活动</h4>
				<h3>每期活动 优惠享不停 </h3>
				<span class="more ">
					<a href="# ">全部活动<i class="am-icon-angle-right" style="padding-left:10px ;"></i></a>
				</span>
			</div>
			<div class="am-g am-g-fixed ">
				<div class="am-u-sm-3 ">
					<div class="icon-sale one "></div>
					<h4>秒杀</h4>
					<div class="activityMain ">
						<img src="../images/activity1.jpg "></img>
					</div>
					<div class="info ">
						<h3>春节送礼优选</h3>
					</div>
				</div>

				<div class="am-u-sm-3 ">
					<div class="icon-sale two "></div>
					<h4>特惠</h4>
					<div class="activityMain ">
						<img src="../images/activity2.jpg "></img>
					</div>
					<div class="info ">
						<h3>春节送礼优选</h3>
					</div>
				</div>

				<div class="am-u-sm-3 ">
					<div class="icon-sale three "></div>
					<h4>团购</h4>
					<div class="activityMain ">
						<img src="../images/activity3.jpg "></img>
					</div>
					<div class="info ">
						<h3>春节送礼优选</h3>
					</div>
				</div>

				<div class="am-u-sm-3 last ">
					<div class="icon-sale "></div>
					<h4>超值</h4>
					<div class="activityMain ">
						<img src="../images/activity.jpg "></img>
					</div>
					<div class="info ">
						<h3>春节送礼优选</h3>
					</div>
				</div>

			</div>
		</div>
		<div class="clear "></div>

		<div id="app3">
			<div v-for="(item,index) in tableData" :key="index">
				<!--甜点-->
	
				<div class="am-container ">
					<div class="shopTitle ">
						<h4>{{item.name}}</h4>
						<h3>每一道{{item.name}}都有一个故事</h3>
						<span class="more ">
							<a href="# ">查看更多<i class="am-icon-angle-right" style="padding-left:10px ;"></i></a>
						</span>
					</div>
				</div>
	
				<div class="am-g am-g-fixed floodFour">
					<div class="am-u-sm-5 am-u-md-4 text-one list ">
	
						<a href="# ">
							<div class="outer-con ">
								<div class="title ">
									开抢啦！
								</div>
								<div class="sub-title ">
									{{item.name}}大礼包
								</div>
							</div>
							<img src="../images/act1.png " />
						</a>
						<div class="triangle-topright"></div>
					</div>
	
					<div :class="itemClass[keyId]" v-for="(child,keyId) in item.goods" :key="keyId+100">
						<div class="outer-con ">
							<div class="title ">
								{{child.name}}
							</div>
							<div class="sub-title ">
								¥{{child.price}}
							</div>
							<i class="am-icon-shopping-basket am-icon-md  seprate"></i>
						</div>
						<a href="#" @click="toGood(keyId)"><img :src="child.img" class="goodImg"/></a>
					</div>
	
				</div>
				<div class="clear "></div>
			</div>
		</div>


		<div class="footer">
			<div class="footer-hd ">
				<p>
					<a href="# ">燕园科技</a>
					<b>|</b>
					<a href="home.html">商城首页</a>
					<b>|</b>
					<a href="# ">支付宝</a>
					<b>|</b>
					<a href="# ">物流</a>
				</p>
			</div>
			<div class="footer-bd ">
				<p>
					<a href="#">关于燕园</a>
					<a href="# ">合作伙伴</a>
					<a href="# ">联系我们</a>
					<a href="# ">网站地图</a>
					<em>© 2020-2020 shop.ysu.edu 耿志龙 版权所有</em>
				</p>
			</div>
		</div>

	</div>
	</div>
	<script src="../js/public.js"></script>
	<script>
		var vm2 = new Vue({
			el: '#app2',
			data: {
				tableData: [],
			},
			created() {
				this.getData()
			},
			methods: {
				getData() {
					$axios.get('/shop/category',
						response => {
							this.tableData = response.data
						}
					)
				},
				hover() {
					console.log(1);
					$('.am-slider').flexslider();
					$('.appliance').hover(function () {
						$(".category-content .category-list li.first .menu-in").css("display", "none");
						$(".category-content .category-list li.first").removeClass("hover");
						console.log(this);
						$(this).addClass("hover");
						$(this).children("div.menu-in").css("display", "block")
					}, function () {
						$(this).removeClass("hover")
						$(this).children("div.menu-in").css("display", "none")
					});
				}
			},
			updated: function () {
				this.$nextTick(function () {
					this.hover()
				})
			}
		})
		var vm3 = new Vue({
			el: '#app3',
			data: {
				tableData: [],
				itemClass: [
					'am-u-sm-7 am-u-md-4 text-two sug',
					'am-u-sm-7 am-u-md-4 text-two',
					'am-u-sm-3 am-u-md-2 text-three big',
					'am-u-sm-3 am-u-md-2 text-three sug',
					'am-u-sm-3 am-u-md-2 text-three ',
					'am-u-sm-3 am-u-md-2 text-three last big '
				]
			},
			created() {
				this.getData()
			},
			methods: {
				getData() {
					$axios.get('/shop/goods',
						response => {
							this.tableData = response.data
						}
					)
				},
				toGood(id) {
					window.localStorage.setItem("goodId",id);
					window.location.href = 'introduction.html'
				}
			}
		})
	</script>

</body>

</html>